for(int i = 0; i < N; i++)
    for(j=0; j < M; j++)
    {
        int &pom = A[i]->snimac[j].teplota;
        // zpracovn pom
    }
